GtkAllocation *allocation)
{
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate (priv->revealer, (GtkAllocation *)allocation);
gtk_widget_get_clip (priv->revealer, &clip);
GtkAllocation *allocation)
{
GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (GTK_CHECK_BUTTON (widget));
- GdkRectangle clip;
+ GdkRectangle clip = *allocation;
if (priv->draw_indicator)
{
{
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
GtkComboBoxPrivate *priv = combo_box->priv;
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate_with_baseline (priv->box, allocation,
gtk_widget_get_allocated_baseline (widget));
GtkAllocation *allocation)
{
GtkAllocation clip = *allocation;
- GtkAllocation children_clip;
+ GtkAllocation children_clip = *allocation;
GtkGrid *grid = GTK_GRID (widget);
GtkGridPrivate *priv = grid->priv;
GtkGridRequest request;
{
GtkIcon *self = GTK_ICON (widget);
GtkIconPrivate *priv = gtk_icon_get_instance_private (self);
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
gtk_css_gadget_allocate (priv->gadget, allocation,
gtk_widget_get_allocated_baseline (widget),
GtkAllocation *allocation)
{
GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (GTK_LEVEL_BAR (widget));
- GtkAllocation clip;
-
- GTK_WIDGET_CLASS (gtk_level_bar_parent_class)->size_allocate (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate (priv->trough_widget, allocation);
gtk_widget_get_clip (priv->trough_widget, &clip);
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkNotebookPrivate *priv = notebook->priv;
- GtkAllocation clip;
-
- gtk_widget_set_allocation (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_css_gadget_allocate (priv->gadget,
allocation,
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (separator));
}
+static void
+gtk_separator_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
+{
+ gtk_widget_set_clip (widget, allocation);
+}
+
static void
gtk_separator_class_init (GtkSeparatorClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->size_allocate = gtk_separator_size_allocate;
+
object_class->set_property = gtk_separator_set_property;
object_class->get_property = gtk_separator_get_property;
GtkAllocation *allocation)
{
GtkSpinButtonPrivate *priv = gtk_spin_button_get_instance_private (GTK_SPIN_BUTTON (widget));
- GtkAllocation clip;
+ GtkAllocation clip = *allocation;
gtk_widget_size_allocate_with_baseline (priv->box, allocation,
gtk_widget_get_allocated_baseline (widget));
{
GtkStack *stack = GTK_STACK (widget);
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
- GtkAllocation clip;
-
- gtk_widget_set_allocation (widget, allocation);
+ GtkAllocation clip = *allocation;
gtk_css_gadget_allocate (priv->gadget,
allocation,
priv->allocation.y = -1;
priv->allocation.width = 1;
priv->allocation.height = 1;
+ priv->clip = priv->allocation;
priv->user_alpha = 255;
priv->alpha = 255;
priv->window = NULL;
allocation.width += shadow.left + shadow.right;
allocation.height += shadow.top + shadow.bottom;
gdk_rectangle_union (&allocation, clip, &priv->clip);
-
-
- while (priv->parent &&
- _gtk_widget_get_window (widget) == _gtk_widget_get_window (priv->parent))
- {
- GtkWidgetPrivate *parent_priv = priv->parent->priv;
- GdkRectangle union_rect;
-
- gdk_rectangle_union (&priv->clip,
- &parent_priv->clip,
- &union_rect);
-
- if (gdk_rectangle_equal (&parent_priv->clip, &union_rect))
- break;
-
- parent_priv->clip = union_rect;
- priv = parent_priv;
- }
}
/*